import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.regex.Pattern;

public class Main {
    static Scanner cin = null;

    static {
        try {
            cin = new Scanner(new FileReader(new File("D.in")));
        } catch (IOException e) {
            cin = new Scanner(System.in);
        }
    }

    public static void main(String[] args) {
        while (cin.hasNextLine()) {
            String line = cin.nextLine();//abcabcabcabc
            int len = line.length();//12
            for (int n = 1; n <= len / 2; n++) {//n=3
                if (len % n != 0) continue;
                String regex = String.format("^(%s)+$", line.substring(0, n));//(abc)+
                if (Pattern.matches(regex, line)) {
                    System.out.println(len / n);
                    break;
                }
            }
        }
    }
}
